<!-- <template>
    <div class="main-layout">
      <LeftMenuView :isCollapse="isCollapse" />
      <div class="main-content">
        <header>
          <el-button @click="toggleMenu">
            <i :class="isCollapse ? 'el-icon-s-unfold' : 'el-icon-s-fold'"></i>
          </el-button>
          <el-button @click="logout" type="text">退出登录</el-button>
        </header>
        <router-view></router-view>
      </div>
    </div>
  </template>
  
  <script>
  import LeftMenuView from '../components/LeftMenuView.vue'
  
  export default {
    name: 'MainLayout',
    components: {
      LeftMenuView
    },
    data() {
      return {
        isCollapse: false
      }
    },
    methods: {
      toggleMenu() {
        this.isCollapse = !this.isCollapse;
      },
      logout() {
        sessionStorage.removeItem('userInfo');
        this.$router.push('/login');
      }
    }
  }
  </script>
  
  <style scoped>
  .main-layout {
    display: flex;
    height: 100vh;
  }
  
  .main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
  }
  
  header {
    padding: 10px;
    background-color: #f0f2f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .el-button {
    margin-right: 10px;
  }
  </style> -->